﻿using Newtonsoft.Json;

namespace ExtjsDocsParser
{
    public class ExtClassDoc
    {
        [JsonProperty("tagname")]
        public string TagName;
        
        [JsonProperty("html")]
        public string Html;
        
        [JsonProperty("allMixins")]
//        "Ext.util.Observable",
//        "Ext.util.Animate",
//        "Ext.state.Stateful"
        public string[] AllMixins;
        
        [JsonProperty("meta")]
        public DocMeta Meta;
     
        [JsonProperty("requires")]
        public string[] Requires;

        [JsonProperty("deprecated")]
        public Deprecated Deprecated;

        [JsonProperty("extends")]
        public string Extends;

        [JsonProperty("inheritable")]
        public bool Inheritable;
        
        [JsonProperty("static")]
        public bool IsStatic;
        
        [JsonProperty("superclasses")]
        public string[] Superclasses;

        [JsonProperty("singleton")]
        public bool Singleton;

        /// <summary>
        /// ext_define, ?
        /// </summary>
        [JsonProperty("code_type")]
        public string CodeType;

        [JsonProperty("alias")]
        public bool? Alias;

        [JsonProperty("statics")]
        public Static Statics;

        [JsonProperty("subclasses")]
        public string[] SubClasses; // "Ext.Component"

        [JsonProperty("uses")]
        public string[] Uses; // "Ext.PluginManager", "Ext.ComponentManager",

        [JsonProperty("protected")]
        public bool Protected;

        [JsonProperty("members")]
        public Members Members;

        [JsonProperty("private")]
        public bool Private;

        [JsonProperty("component")]
        public bool Component;

        [JsonProperty("name")]
        public string Name; // "Ext.AbstractComponent"

        [JsonProperty("alternateClassNames")]
        public string[] AlternateClassNames; 
    
        [JsonProperty("id")]
        public string Id;  // "class-Ext.AbstractComponent",

        [JsonProperty("mixedInto")]
        public string[] MixedInto; 
    
//        [JsonProperty("xtypes")]
//        public string[] Xtypes; 
    
        [JsonProperty("files")]
        public File[] Files;

        // goes from html documentation
        [JsonIgnore]
        public Hierarchy Hierarchy;

        [JsonIgnore]
        public Documentation Docs;
    }
}